package com.zhuss.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class NoUtil {
	
	public static final String ORDER = "ORDER_";
	
	public static final String PRODUCT = "PRODUCT_";
	
	public static final String FOOD = "FOOD_";

	public static final String YJ = "YJ_";

	public static final String TS = "TS_";
	
	public static String gen() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
		String str = sdf.format(new Date()) + Math.round(Math.random() * 1000) ;
		return str;
	}
	
	public static String genOrder() {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
		String str = sdf.format(new Date()) + Math.round(Math.random() * 1000) ;
		return str;
	}

	public static String simpleNo(String no) {
		if (no != null && !"".equals(no)) {
			no = no.substring(no.indexOf("_") + 1);
		}
		return no;
		
	}
	

}
